package com.example.blog.mapper;

import com.example.blog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {
    //根据用户名字，查找用户信息
   @Select("select * from user where user_name =#{username} and delete_flag=0")
    UserInfo queryByName(String username);
   //根据用户Id,查找用户信息
    @Select("select * from user where id=#{id} and delete_flag=0")
    UserInfo queryById( Integer id);
}
